/***********************************************
 **** 版权声明处 **
 ****  为了方便阅读和维护，请严格遵守相关代码规范，谢谢   ****
 *******************************************/
package com.hjx.model.business
{
	/*******************************************
	 **** @author huangjixin,@date 2012-7-25, @time 下午4:46:55 **
	 **** 请一句话表述该类主要作用  **
	 *******************************************/
	import com.hjx.common.Global;
	import com.hjx.model.vo.*;
	
	import mx.rpc.AbstractOperation;
	import mx.rpc.IResponder;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.remoting.mxml.RemoteObject;
	
	public class UserServiceImplDelegate  
	{  
		private var responder : IResponder;  
		private var service : Object;  
		
		public function UserServiceImplDelegate(pResponder : IResponder )  
		{  
			service = new RemoteObject();  
			service.endpoint=Global.getInstance().endPoint;  // 端点；
			service.destination="userService";  
			service.makeObjectsBindable=true;  
			service.showBusyCursor=true;
			responder = pResponder;  
		}     
		
		public function getStr():void  
		{  
			var call:Object = service.getStr();  
			call.addResponder(responder);  
		}  
		
		public function selectAll():void  
		{  
			var call:Object = service.selectAll();  
			call.addResponder(responder);  
		}  
		
		public function selectByPage(page:Page):void  
		{  
			var call:Object = service.selectByPage(page);  
			call.addResponder(responder);  
		}  
		
		public function deleteByPrimaryKey(id:int):void  
		{  
			var call:Object = service.deleteByPrimaryKey(id);  
			call.addResponder(responder);  
		}  
		
		public function insert(record:User):void  
		{  
			var call:Object = service.insert(record);  
			call.addResponder(responder);  
		}  
		
		public function insertSelective(record:User):void  
		{  
			var call:Object = service.insertSelective(record);  
			call.addResponder(responder);  
		}  
		
		public function selectByPrimaryKey(id:int):void  
		{  
			var call:Object = service.selectByPrimaryKey(id);  
			call.addResponder(responder);  
		}  
		
		public function updateByPrimaryKeySelective(record:User):void  
		{  
			var call:Object = service.updateByPrimaryKeySelective(record);  
			call.addResponder(responder);  
		}  
		
		public function updateByPrimaryKey(record:User):void  
		{  
			var call:Object = service.updateByPrimaryKey(record);  
			call.addResponder(responder);  
		}  
		
		public function getByUserId(userId:int):void  
		{  
			var call:Object = service.getByUserId(userId);  
			call.addResponder(responder);  
		}  
		
		public function connectRole(userId:int, roleId:int):void  
		{  
			var call:Object = service.connectRole(userId, roleId);  
			call.addResponder(responder);  
		}  
		
		public function disConnectRole(userId:int, roleId:int):void  
		{  
			var call:Object = service.disConnectRole(userId, roleId);  
			call.addResponder(responder);  
		}  
	} //类结束
}//包结束